
import javax.microedition.lcdui.*;

public class ChatWith extends Form implements CommandListener, ItemCommandListener {

private TextField name = new TextField("Nhap ten thanh vien: ", "", 20, TextField.ANY);
private Command ok = new Command("Chon", Command.ITEM, 0);
private Command back = new Command("Tro lai", Command.BACK, 0);
private StringItem item = new  StringItem(null, "Moi chat", Item.BUTTON);





public ChatWith() {
super("Chat voi...");
this.append(name);
this.addCommand(back);
this.setCommandListener(this);
item.setDefaultCommand(ok);
item.setItemCommandListener(this);
this.append(item);
}

public void commandAction(Command c, Displayable d) {


if (c == back) {
    
    SetDisplay.setCurrent(SetDisplay.FRIENDSLIST);

}





}

    public void commandAction(Command c, Item item) {
       if (c == ok) {
    //
}
    }
}